package com.example.petplanet.util;

import com.example.petplanet.domain.User;



public class TLUtil {
    private static final ThreadLocal<User> o = new ThreadLocal<>();
    private static final ThreadLocal<Long> userid=new ThreadLocal<>();
    public static Long getUserId() {
        return userid.get();
    }
    public static void setUserId(Long userId) {
        userid.set(userId);
    }
    public static void removeUserId() {
        userid.remove();
    }
    public static User getUser() {
        return o.get();
    }
    public static void setUser(User value) {
        o.set(value);
    }
    public static void removeUser() {
        o.remove();
    }
}
